package com.finance.cooperate.common.enumerate;

import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName ScrapyAppCategoriesEnum
 * @Description 爬虫App类型
 * @Author shen
 * @Date 2022/9/14 14:38
 * @Modify ...
 */
public enum ScrapyAppCategoriesEnum {

    Top_Overall("100", "Top Overall"),
    Android_Wear("115", "Android Wear"),
    Art_Design("116", "Art & Design"),
    Auto_Vehicles("117", "Auto & Vehicles"),
    Beauty("118", "Beauty"),
    Books_Reference("50", "Books & Reference"),
    Business("51", "Business"),
    Comics("52", "Comics"),
    Communication("53", "Communication"),
    Dating("119", "Dating"),
    Education("54", "Education"),
    Entertainment("55", "Entertainment"),
    Events("120", "Events"),
    Family("121", "Family"),
    Finance("56", "Finance"),
    Food_Drink("122", "Food & Drink"),
    Games("102", "Games"),
    Health_Fitness("57", "Health & Fitness"),
    House_Home("123", "House & Home"),
    Libraries_Demo("58", "Libraries & Demo"),
    Lifestyle("59", "Lifestyle"),
    Maps_Navigation("72", "Maps & Navigation"),
    Medical("62", "Medical"),
    Music_Audio("63", "Music & Audio"),
    News_Magazines("64", "News & Magazines"),
    Parenting("124", "Parenting"),
    Personalization("65", "Personalization"),
    Photography("66", "Photography"),
    Productivity("67", "Productivity"),
    Shopping("68", "Shopping"),
    Social("69", "Social"),
    Sports("70", "Sports"),
    Tools("71", "Tools"),
    Top_Apps("99", "Top Apps"),
    Top_New("101", "Top New"),
    Travel_Local("73", "Travel & Local"),
    Video_Players_Editors("61", "Video Players & Editors"),
    Weather("74", "Weather");


    // 编码【scrapy_applist 表 categories_id】
    private String code;

    // 描述
    private String name;

    public static Set<String> getCodes() {

        Set<String> set = new HashSet<>();

        ScrapyAppCategoriesEnum[] values = ScrapyAppCategoriesEnum.values();

        for (ScrapyAppCategoriesEnum e : values) {

            // 这几个不算
            if (e == ScrapyAppCategoriesEnum.Top_Overall || e == ScrapyAppCategoriesEnum.Top_Apps || e == ScrapyAppCategoriesEnum.Top_New) {
                continue;
            }

            set.add(e.getCode());

        }

        return set;
    }


    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    ScrapyAppCategoriesEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

}
